#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QWidget>
#include "qsolver.h"

class QListWidget;
class QPushButton;
class QAlphaField;
class QLabel;
class QMenu;

class MainWindow : public QWidget
{
    Q_OBJECT
public:
    MainWindow(QWidget *parent = 0);
    ~MainWindow();
public slots:
    void doneClicked();
    void solverStarted();
    void compMove();
    void usrWordChanged(QString str);
    void newGameClicked();
    void newGameStart(QAction *action);

private:
    QAlphaField *field;
    QListWidget *list_comp;
    QListWidget *list_player;
    QPushButton *done;
    QPushButton *newGame;
    QLabel *comp;
    QLabel *player;
    QLabel *status;
    QLabel *usr_word;
    QSolver *sol;

    QAction *veryEasyLevel;
    QAction *easyLevel;
    QAction *mediumLevel;
    QAction *hardLevel;
    QAction *veryHardLevel;
    QMenu *newGameMenu;
    QString word;

    wstring firstWord;
    bool firstMove;
    int comp_score;
    int player_score;
    int level;

    void updateScore();
    void updateLevel();

    void warn(const QString &text);

    bool warn_user;
private slots:
    void disableWarning();
};

#endif // MAINWINDOW_H
